package com.cloudcc.mobile.presenter;

import com.cloudcc.cloudframe.net.RequestListener;
import com.cloudcc.mobile.dao.impl.ContactEngineImpl;
import com.cloudcc.mobile.entity.OperateFollowRelation;

/**
 * @Description: 其他操作
 * @author wangzhiqiang
 * @date 2015-12-16 下午10:26:21
 * 
 */
public class OtherPresenter extends BasePresenter {

	/**
	 * 跟随一条记录
	 * 
	 * @param id
	 * @param hasFollowed
	 * @param listener
	 */
	public void followRecord(String id, boolean hasFollowed,
			RequestListener listener) {
		OperateFollowRelation op = new OperateFollowRelation();
		op.setFollowType("record");
		op.setParentId(id);
		op.setFollowStatus(hasFollowed ? "0" : "1");
		new ContactEngineImpl().followContact(op, listener);
	}

	/**
	 * 关注某人
	 * 
	 * @param id
	 * @param hasFollowed
	 *            当前的关注状态
	 * @param listener
	 */
	public void followPeople(String id, boolean hasFollowed,
			RequestListener listener) {
		OperateFollowRelation op = new OperateFollowRelation();
		op.setFollowType("people");
		op.setParentId(id);
		op.setFollowStatus(hasFollowed ? "0" : "1");
		new ContactEngineImpl().followContact(op, listener);
	}

	/**
	 * 发送短信
	 * 
	 * @param phoneNumber
	 * @param content
	 * @param binding
	 */
	public void sendSMS(String phoneNumber, String content, String binding) {

	}

}
